﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.Master" Inherits="System.Web.Mvc.ViewPage<VietThuongLMS.ViewModels.LienHeViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <legend>
        <h2>
            Danh sách liên hệ</h2>
    </legend>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>
                    #
                </th>
                <th>
                    Họ tên
                </th>
                <th>
                    Email
                </th>
                <th>
                    Ngày đăng
                </th>
                <th>
                    Hành động
                </th>
            </tr>
        </thead>
        <tbody>
            <% 
                if (@Model != null && @Model.List.Count > 0)
                {
                    int i = 1;
                    foreach (VietThuongLMS.LienHe @LienHe in @Model.List)
                    {%>
            <tr>
                <td>
                    <%=i%>
                </td>
                <td>
                    <%=@LienHe.HoTen%>
                </td>
                <td>
                    <%=@LienHe.Email%>
                </td>
                <td>
                    <%=@LienHe.NgayDang.Value.ToString("dd/MM/yyyy hh:mm:ss")%>
                </td>
                <td>
                    <%= Html.ActionLink("Chi tiết", "Detail", "LienHe", new { area = "Admin", id = @LienHe.ID }, new { @class = "btn btn-primary" })%>
                </td>
            </tr>
            <% i++;
                    }%>
            <tr>
                <td colspan="5">
                    <%
                        if ((string)ViewData["pageLinks"] != "")
                        { %>
                    <%= ViewData["pageLinks"] %>
                    <% } %>
                </td>
            </tr>
            <%
                }
                else
                {
            %>
            <tr>
                <td colspan="5" style="text-align: center;">
                    Empty List
                </td>
            </tr>
        </tbody>
    </table>
    <% }
    %>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
